from celery import Celery

# 为celery使用django配置文件进行设置
import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'meiduo_mall.settings.dev'

# 下面是celery对象的创建
app = Celery('meidui',broker='redis://127.0.0.1:6379/15')

app.autodiscover_tasks(['celery_tasks.sms','celery_tasks.email','celery_tasks.html'])